#pragma once
#include <vector>
#include "Warehouse.h"
#include "LogEntry.h"


struct MovRtype {
	Kg range;
	Kg capacity;
	int charge_time;

	MovRtype(const Kg& r, const Kg& c, const int& ch_t) : range(r), capacity(c), charge_time(ch_t) {}
};

struct RobotTypes {
	int powrPrice;
	std::map<int, MovRtype> movRs;
	int Size(){ return movRs.size(); }
};

class Menu {
	Warehouse			  _wHouse;
	RobotTypes			  _rtypes;
	std::vector<RobotEntry> _rlog;
	std::vector<ItemEntry> _ilog;
public:
	enum Exceptions{RBFILE,NODATA,ANSWER,BADCHAR,NOMOVR,NOPOWR,NOACTIVE,NOPASSIVE};

	Menu();
	void Run();

private:	
	enum Options{NEXTDAY,STANDINGS,GARAGE,BUYMOVR,BUYPOWR,SUSPEND,WAKEUP,QUIT,RESET};
	void Init();

	Menu::Options MainMenu() const;
	void NextDay();
	void Standings() const;
	void Garage() const;
	void NewMovR();
	//void NewMovR(const MovRtype& newMvR){ _wHouse.NewMovR(newMvR.range, newMvR.capacity); }
	void NewPowR();

	void SuspendMovR();
	void WakeUpMovR();

	TimeStamp CurrentTime() { return _wHouse.Current().ArrivedAt(); }

	
	friend int GetIntInterval(const int& m, const int& n);
};


/* GLOBALS */

/*template <class T>
int OptionShow(const std::string& dscript,const std::vector<T>& options){

}*/
